from Crypto.PublicKey import ECC

# key = ECC.generate(curve='P-521')
# private_key = key.export_key(format='PEM')
# file_out = open("private.pem", "w")
# file_out.write(private_key)
# file_out.close()

# public_key = key.public_key()
# file_out = open("public.pem", "w")
# file_out.write(public_key.export_key(format='PEM'))
# file_out.close()

f = open('public.pem','rt')
key = ECC.import_key(f.read())
print(key)

from Crypto.Random import get_random_bytes
from Crypto.Cipher import AES, PKCS1_OAEP
cipher_rsa = PKCS1_OAEP.new(key)
session_key = get_random_bytes(16)


from Crypto.Protocol.KDF import bcrypt
from base64 import b64encode
from Crypto.Hash import SHA256
password = b"test"
b64pwd = b64encode(SHA256.new(password).digest())
bcrypt_hash = bcrypt(b64pwd, 12)

